package br.cin.ufpe.corba;

import java.io.Serializable;

public class ORBAddress implements Serializable {
	
	private static final long serialVersionUID = 8320297500079970102L;
	
	private String host;
	private int port;
	
	public ORBAddress(String host, int port) {
		this.setHost(host);
		this.setPort(port);		
	}
	
	public void setHost(String host) {
		this.host = host;
	}

	public String getHost() {
		return host;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public int getPort() {
		return port;
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof ORBAddress) {
			ORBAddress oa = (ORBAddress) obj;
			return (oa.host.equals(this.host) && oa.port == this.port);
		}
		return false;
	}

}
